package com.util;

public class DecoderUnit {
    private static final int OFFSET = '0'; // 假设 OFFSET 是 '0'
    public static void decode(byte[] output, String input) {
        int len = input.length();
        for (int i = 0; i < len / 2; i++) {
            int high = (input.charAt(2 * i) - OFFSET) << 4;
            int low = (input.charAt(2 * i + 1) - OFFSET);
            output[i] = (byte) (high | low);
        }
    }
}
